package com.koicarp.agent.workflow;

import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.ollama.OllamaChatModel;

import java.time.Duration;

/**
 * @Author: liuxia
 * @CreateTime: 2025/2/24 上午10:55
 * @Description:
 */
public class OllamaChatModelBuild {

    public static String QWEM2_7B = "qwen2:7b";
    public static String DEEP_7B = "deepseek-r1:7b";


    static String BASE_URL = "http://localhost:11434";

    public static ChatLanguageModel build(String modelName) {
        ChatLanguageModel model = OllamaChatModel.builder()
                .baseUrl(BASE_URL)
                .modelName(modelName)
                .timeout(Duration.ofHours(10))
                .build();
        return model;
    }
}
